﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="icon" type="image/gif" href="~/img/animated_favicon1.gif">
    <link href="~/UILibs/easyui/themes/default/easyui.css" rel="stylesheet" />
    <link href="~/UILibs/easyui/themes/icon.css" rel="stylesheet" />
    <link href="~/Css/css.css" rel="stylesheet" />

    <script src="~/Scripts/jquery-1.7.1.min.js"></script>
    <script src="~/Scripts/jquery.jqprint-0.3.js"></script>
    <script src="~/UILibs/easyui/jquery.easyui.min.js"></script>

    <script src="~/UILibs/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script src="~/Scripts/datagrid-detailview.js"></script>
    <title></title>
    <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
    <script type="text/javascript">

        $(function () {

            //动态加载  店铺列表
            $("#shopName").combobox({
                url: '/SupportNumShelf/GetShop',
                //action 
                valueField: "shopID",
                textField: "shopName"
            });

            $("#data").datagrid({
                fit: true,
                title: '店铺商品上架排行',
                striped: true,
                rownumbers: true,
                columns:    // logId  logTime  logType  waresCode     status   RealName   userid  storeName    waresName num sortable: true, 
                    [[
                            { field: 'waresCode', title: '商品编号', width: 180, halign: 'center', align: 'center' },
                            { field: 'waresName', title: '商品名称', width: 300, halign: 'center', align: 'center', },
                            { field: 'logNum', title: '上架总数量', width: 200, halign: 'center', align: 'center', sortable: true, },
                            {
                                field: 'logRate', title: '上架频次', width: 200, halign: 'center', align: 'center',
                            }
                           // { field: 'storeName', title: '所属店铺', width: 200, halign: 'center', align: 'center', }
                    ]],
                singleSelect: true,
                loadMsg: '正在加载数据,请耐心等待.......',
                url: pageConfig.getAction,
                queryParams: {
                    sort: "logNum",
                    order: "desc"
                },
                //pagination: true,
                //pageSize: 25,
                //pageList: [25, 30, 35],
                sortName: 'logNum',  //平均上架数量 排序
                sortOrder: 'desc',
                toolbar: '#tool',
            });
            $("#formdialog").dialog({
                width: 400,
                height: 250,
                closed: true,
                modal: true,
                buttons: '#btns',
            });

        });

        var pageConfig = {
            getAction: '@Url.Action("GetNoticeBySql")',// GetNoticeEf   GetNotice 
            modifyAction: '@Url.Action("ModifyReply")',

        };

        //查询
        function searchData() {

            $("#data").datagrid('load', {
                sort:"logNum",
                order:"DESC",
                storeCode: $('#shopName').val(),
                date1:  $("#txtDate1").val(),
                date2: $("#txtDate2").val(),

            });
        }

        //取消按钮
        function closeDptDialog() {
            $("#formdialog").dialog("close")
        }

        function complete() {
            $("#data").datagrid("load");
            $.messager.progress("close");
        }

    </script>
</head>
<body class="easyui-layout" style="width: 100%; height: 100%">
    <div data-options="region:'center'" id="dataPrint">

        <table id="data" style="height: 50px"></table>

    </div>

    <div id="tool" style="padding: 30px;">

        <div>
            &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp 
             <span style="font-size: larger; color: brown; margin-top: initial;">请选择日期进行查询:</span>
        <input id="txtDate1" type="text" class="easyui-datebox"  />
       ---
        <input id="txtDate2" type="text" class="easyui-datebox" onchange="searchData()" />
        &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp
                店铺名称：<input id="shopName" type="text" class="easyui-combobox"  onchange="searchData()" />
            
            &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp 
            <a class="easyui-linkbutton" iconcls="icon-search" onclick="searchData();">查询</a>
            &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp <br />  <br />
                <span style="font-size: 18px; color: red">&nbsp&nbsp &nbsp&nbsp&nbsp   &nbsp&nbsp&nbsp &nbsp&nbsp&nbsp   注意:默认显示为近两周所有店铺商品上架情况</span>
               
        </div>

    </div>


    <style>
        #dataPrint.datagrid-btable tr {
            height: 50px;
        }
    </style>
</body>
</html>
